<%@page import="java.util.Date"%>
<%@page import="java.util.Locale"%>
<%@page import="java.util.TimeZone"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
h1{
color:red;
}
</style>
</head>
<body>
<h1 onclick='setBlue()'>欢迎你！</h1>
<p>当前日期是：<%
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss EEEEEE", Locale.CHINA);  //ALT+/
df.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
out.print(df.format(new Date()));
%></p>
<script type="text/javascript">
function setBlue(){
	document.querySelector('h1').style.color='blue'
}
</script>
</body>
</html>